//Wed Jun 22 02:33:47 CDT 2011
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class Hawaiian {
public:
	vector <string> getWords(string);
	bool letter(char c){
		c = tolower(c);
		if(c == 'a') return true;
		if(c == 'e') return true;
		if(c == 'i') return true;
		if(c == 'o') return true;
		if(c == 'u') return true;
		if(c == 'h') return true;
		if(c == 'k') return true;
		if(c == 'l') return true;
		if(c == 'm') return true;
		if(c == 'n') return true;
		if(c == 'p') return true;
		if(c == 'w') return true;
		return false;
	}
	bool check(string s){
		for(int i=0; i<s.size(); i++){
			if(letter(s[i])==false) return false;
		}
		return true;
	}
};

vector <string> Hawaiian::getWords(string sentence) {
	vector<string> ret;
	stringstream s(sentence);
	string str;
	while(s >> str){
		if(check(str)) ret.push_back(str);
	}
	return ret;
}


//Powered by [KawigiEdit] 2.0!
